.class Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;
.super Landroid/os/AsyncTask;
.source "CommentsListActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/opongo/blogapp/activities/CommentsListActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "downloadCommentsAsyncTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;


# direct methods
.method private constructor <init>(Lcom/opongo/blogapp/activities/CommentsListActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 156
    iput-object p1, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/opongo/blogapp/activities/CommentsListActivity;Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 156
    invoke-direct {p0, p1}, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;-><init>(Lcom/opongo/blogapp/activities/CommentsListActivity;)V

    return-void
.end method


# virtual methods
.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->doInBackground([Ljava/lang/Void;)Ljava/lang/Void;

    move-result-object v0

    return-object v0
.end method

.method protected varargs doInBackground([Ljava/lang/Void;)Ljava/lang/Void;
    .locals 5
    .parameter "params"

    .prologue
    const/4 v4, 0x0

    .line 160
    sget-boolean v1, Lcom/opongo/blogapp/activities/CommentsListActivity;->DEBUG:Z

    if-eqz v1, :cond_0

    invoke-static {}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$0()Ljava/lang/String;

    move-result-object v1

    const-string v2, "Downloading comments..."

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 169
    :cond_0
    iget-object v1, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    iget-object v2, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/CommentsListActivity;->apiManager:Lcom/opongo/blogapp/manager/APIManager;
    invoke-static {v2}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$1(Lcom/opongo/blogapp/activities/CommentsListActivity;)Lcom/opongo/blogapp/manager/APIManager;

    move-result-object v2

    iget-object v3, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/CommentsListActivity;->postid:I
    invoke-static {v3}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$2(Lcom/opongo/blogapp/activities/CommentsListActivity;)I

    move-result v3

    invoke-virtual {v2, v3}, Lcom/opongo/blogapp/manager/APIManager;->getComments(I)Ljava/util/ArrayList;

    move-result-object v2

    #setter for: Lcom/opongo/blogapp/activities/CommentsListActivity;->comments:Ljava/util/ArrayList;
    invoke-static {v1, v2}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$3(Lcom/opongo/blogapp/activities/CommentsListActivity;Ljava/util/ArrayList;)V

    .line 171
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 173
    .local v0, sortedCommentsArray:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/opongo/blogapp/common/Comment;>;"
    iget-object v1, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/CommentsListActivity;->comments:Ljava/util/ArrayList;
    invoke-static {v1}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$4(Lcom/opongo/blogapp/activities/CommentsListActivity;)Ljava/util/ArrayList;

    move-result-object v1

    if-eqz v1, :cond_1

    .line 174
    iget-object v1, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/CommentsListActivity;->comments:Ljava/util/ArrayList;
    invoke-static {v1}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$4(Lcom/opongo/blogapp/activities/CommentsListActivity;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-eqz v1, :cond_1

    .line 175
    iget-object v1, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    iget-object v2, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/CommentsListActivity;->comments:Ljava/util/ArrayList;
    invoke-static {v2}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$4(Lcom/opongo/blogapp/activities/CommentsListActivity;)Ljava/util/ArrayList;

    move-result-object v2

    #calls: Lcom/opongo/blogapp/activities/CommentsListActivity;->sortComment(Ljava/util/ArrayList;Ljava/util/ArrayList;Lcom/opongo/blogapp/common/Comment;)Ljava/util/ArrayList;
    invoke-static {v1, v2, v0, v4}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$5(Lcom/opongo/blogapp/activities/CommentsListActivity;Ljava/util/ArrayList;Ljava/util/ArrayList;Lcom/opongo/blogapp/common/Comment;)Ljava/util/ArrayList;

    .line 177
    :cond_1
    iget-object v1, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #setter for: Lcom/opongo/blogapp/activities/CommentsListActivity;->comments:Ljava/util/ArrayList;
    invoke-static {v1, v0}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$3(Lcom/opongo/blogapp/activities/CommentsListActivity;Ljava/util/ArrayList;)V

    .line 179
    return-object v4
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->onPostExecute(Ljava/lang/Void;)V

    return-void
.end method

.method protected onPostExecute(Ljava/lang/Void;)V
    .locals 4
    .parameter "result"

    .prologue
    .line 184
    sget-boolean v2, Lcom/opongo/blogapp/activities/CommentsListActivity;->DEBUG:Z

    if-eqz v2, :cond_0

    invoke-static {}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$0()Ljava/lang/String;

    move-result-object v2

    const-string v3, "onPostExecute"

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 186
    :cond_0
    iget-object v2, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #calls: Lcom/opongo/blogapp/activities/CommentsListActivity;->reloadComments()V
    invoke-static {v2}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$6(Lcom/opongo/blogapp/activities/CommentsListActivity;)V

    .line 188
    iget-object v2, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/CommentsListActivity;->comments:Ljava/util/ArrayList;
    invoke-static {v2}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$4(Lcom/opongo/blogapp/activities/CommentsListActivity;)Ljava/util/ArrayList;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-nez v2, :cond_1

    .line 189
    iget-object v2, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    const v3, 0x7f080019

    invoke-virtual {v2, v3}, Lcom/opongo/blogapp/activities/CommentsListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    .line 190
    .local v0, pb:Landroid/widget/ProgressBar;
    const/4 v2, 0x4

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 191
    iget-object v2, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    const v3, 0x7f08001a

    invoke-virtual {v2, v3}, Lcom/opongo/blogapp/activities/CommentsListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 192
    .local v1, tv:Landroid/widget/TextView;
    iget-object v2, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    const v3, 0x7f070026

    invoke-virtual {v2, v3}, Lcom/opongo/blogapp/activities/CommentsListActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 194
    iget-object v2, p0, Lcom/opongo/blogapp/activities/CommentsListActivity$downloadCommentsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CommentsListActivity;

    #calls: Lcom/opongo/blogapp/activities/CommentsListActivity;->showAlertNoComments()V
    invoke-static {v2}, Lcom/opongo/blogapp/activities/CommentsListActivity;->access$7(Lcom/opongo/blogapp/activities/CommentsListActivity;)V

    .line 196
    .end local v0           #pb:Landroid/widget/ProgressBar;
    .end local v1           #tv:Landroid/widget/TextView;
    :cond_1
    return-void
.end method
